/* 右键上下文菜单容器 */
.context-menu {
  position: fixed;
  z-index: 9999;
  background-color: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 4px 0;
  min-width: 180px;
  animation: contextMenuFadeIn 0.15s ease-out;
}

/* 深色主题支持 */
@media (prefers-color-scheme: dark) {
  .context-menu {
    background-color: #1f1f1f;
    border-color: #434343;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  }
}

/* 菜单项 */
.context-menu-item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  user-select: none;
  color: rgba(0, 0, 0, 0.88);
  font-size: 14px;
}

.context-menu-item:hover {
  background-color: #f5f5f5;
}

.context-menu-item:active {
  background-color: #e8e8e8;
}

@media (prefers-color-scheme: dark) {
  .context-menu-item {
    color: rgba(255, 255, 255, 0.85);
  }

  .context-menu-item:hover {
    background-color: #2a2a2a;
  }

  .context-menu-item:active {
    background-color: #333333;
  }
}

/* 禁用状态 */
.context-menu-item.disabled {
  cursor: not-allowed;
  opacity: 0.4;
  pointer-events: none;
}

/* 菜单项图标 */
.context-menu-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  margin-right: 12px;
  font-size: 16px;
  color: rgba(0, 0, 0, 0.65);
}

@media (prefers-color-scheme: dark) {
  .context-menu-icon {
    color: rgba(255, 255, 255, 0.65);
  }
}

/* 菜单项标签 */
.context-menu-label {
  flex: 1;
  line-height: 20px;
}

/* 分割线 */
.context-menu-divider {
  height: 1px;
  background-color: #e8e8e8;
  margin: 4px 0;
}

@media (prefers-color-scheme: dark) {
  .context-menu-divider {
    background-color: #434343;
  }
}

/* 淡入动画 */
@keyframes contextMenuFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
